package com.woniu02;

class Coffee {

    public String coffee(){
        return "coffee";
    }
}
class milkCoffee extends Coffee{
        Coffee coffee;

        public void coffee(Coffee coffee){
            this.coffee = coffee;
        }
        public String getcoffee(){
            return "milk"+coffee.coffee();
        }
}

public class Test01 {
    public static void main(String[] args) {
        Coffee coffee1 = new milkCoffee();
        System.out.println(coffee1.coffee());


        milkCoffee coffee = new milkCoffee();
        coffee.coffee(new Coffee());
        System.out.println(coffee.getcoffee());
    }
}
